import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Course1 from '../views/Course1'
import AddCourse from '../views/AddCourse'
import CourseDesc from '../views/CourseDesc'
import BooksList from '../views/BooksList'
import AddBook from '../views/AddBook'
import TeacherList from '../views/teacherList'
import departmentList from '../views/departmentList'
import AddTeacher from '../views/addTeacher';
import addDepartment from '../views/addDepartment'
import adminiStrator from '../views/adminiStrator'
import addAdmin from '../views/addAdmin'
import Kuangjia from '../components/kuangjia'
import Student from '../views/Student'
import Index from '../views/index'
import newStudent from '../views/newStudent'
import noResponse from '../components/noResponse'
Vue.use(VueRouter);

const routes = [{
        path: '/',
        redirect: { name: 'Login' }
    },
    {
        path: '/login',
        name: 'Login',
        component: Login
    },
    {
        path: '/kuangjia',
        name: 'Kuangjia',
        component: Kuangjia,
        children: [{
                path: '/newStudent',
                name: 'newStudent',
                component: newStudent
            },
            {
                path: '/Student',
                name: 'Student',
                component: Student
            },
            {
                path: '/teacherList',
                name: 'TeacherList',
                component: TeacherList
            },
            {
                path: '/course1',
                name: 'Course1',
                component: Course1
            },
            {
                path: '/addCourse',
                name: 'AddCourse',
                component: AddCourse
            },
            {
                path: '/courseDesc',
                name: 'CourseDesc',
                component: CourseDesc
            },
            {
                path: '/booksList',
                name: 'BooksList',
                component: BooksList
            },
            {
                path: '/addBook',
                name: 'AddBook',
                component: AddBook
            },
            {
                path: '/addTeacher',
                name: 'AddTeacher',
                component: AddTeacher
            },
            {
                path: '/departmentList',
                name: 'departmentList',
                component: departmentList
            },
            {
                path: '/addDepartment',
                name: 'addDepartment',
                component: addDepartment
            },
            {
                path: '/administrator',
                name: 'adminiStrator',
                component: adminiStrator
            },
            {
                path: '/addAdmin',
                name: 'addAdmin',
                component: addAdmin
            },
            {
                path: '/index',
                name: 'Index',
                component: Index
            },
            {
                path: '/noresponse',
                name: 'noResponse',
                component: noResponse
            }
        ]
    }
];

const router = new VueRouter({
    routes
});

export default router